import { _decorator, Component, Node } from 'cc';
const { ccclass, property } = _decorator;

@ccclass('WebSocketConnectMain')
export class WebSocketConnectMain extends Component {



    async onLoad(){

        // //添加网络监听
        // JNSocket.getIns().on(NActionServer.NActionDemo2,this.onNActionDemo2,this,"NActionDemo2");

        // //连接Socket
        // await JNSocket.getIns().onInit();

        // //PING
        // JNSocket.getIns().Send(NActionServer.PING);
        // JNSocket.getIns().Send(NActionServer.NActionDemo,{message:"Hello Message"},NActionMessage.NActionDemo);

    }

    onNActionDemo2(data){
        console.log("onNActionDemo2",data);
    }

}


